Public Class BookToString
    Inherits System.ComponentModel.TypeConverter
    Public Overrides Function ConvertFrom( _
        ByVal context As System.ComponentModel.ITypeDescriptorContext, _
        ByVal culture As System.Globalization.CultureInfo, _
        ByVal value As Object) As Object
        Dim bk As Book
        Dim strBookSerialized As String

        bk = CType(value, Book)
        strBookSerialized = bk.ISBN & "*" & bk.CustomerRating & "*"

        Return strBookSerialized

    End Function

    Public Overrides Function ConvertTo( _
       ByVal context As System.ComponentModel.ITypeDescriptorContext, _
       ByVal culture As System.Globalization.CultureInfo, _
       ByVal value As Object, _
       ByVal destinationType As System.Type) As Object
        Dim bk As Book
        Dim strValue As String
        Dim strProps() As String

        strValue = CType(value, String)
        strProps = Split(strValue, "*")
        bk = New Book(strProps(0))
        bk.CustomerRating = strProps(1)

        Return bk

    End Function

End Class
